@using BlazorApp.Pages.Common
@inherits BlazorApp.Pages.Common.DrawerPageBase<k8s.Models.V1Pod>

@if (_podItem != null)
{
    <div>
        <SimpleSelect Style="width:250px;" DefaultValue="@_podItem.Spec.Containers[0].Name" OnSelectedItemChanged="OnContainerSelectChanged">
            <SelectOptions>
                @foreach (var c in _podItem.Spec.Containers)
                {
                    <SimpleSelectOption Value="@c.Name" Label="@c.Name"></SimpleSelectOption>
                }
            </SelectOptions>
        </SimpleSelect>
        <Button Type="@ButtonType.Primary" OnClick="OnOkBtnClicked">确定</Button>

    </div>
    <div style="height: 100%;min-height: 400px">
        <Xterm
            @ref="_terminal"
            Options="_options"
            OnFirstRender="@OnFirstRender"
            OnKey="@OnKey"/>
    </div>

    <PodLogWatcher OnPodLogChanged="@OnPodLogChanged" PodItem="@_podItem" ContainerName="@_containerName"></PodLogWatcher>
}
